0,<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="/vraptor-blank-project/bootstrap/css/estilo.css">
<link rel="stylesheet" type="text/css"
	href="/vraptor-blank-project/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
	href="//cdn.datatables.net/1.10.4/css/jquery.dataTables.min.css">
<script src="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>,
<script type="text/javascript">
$(document).ready(function() {
    $("#tab").DataTable();
} );
</script>	
<title>Home</title>
</head>
<body>



	<div class="jumbotron" id="jumbotron">
<h1>Cardapio </h1>
</div>

<div class="container">
<div class="bb">
            <c:if test="${usuarioweb.isLogado()}">
				<h3>Usuário: ${usuarioweb.nome}</h3>
				<a href="${linkTo[UsuarioController].logout}"><button class="btn btn-primary col-md-1 col-md-offset-0">sair</button></a>
				<a href="${linkTo[UsuarioController].edit}?id=${usuarioweb.id}"><button class="btn btn-primary col-md-1 col-xs-offset-1"> Editar Perfil</button></a>
			</c:if>
			
			 <c:if test="${administradorweb.isLogado()}">
				<h3>Administrador: ${administradorweb.nome}</h3>
				<a href="${linkTo[AdministradorController].logout}"><button class="btn btn-primary col-md-1 col-md-offset-0">sair</button></a>
				<a href="${linkTo[AdministradorController].edit}?id=${administradorweb.id}"><button class="btn btn-primary col-md-1 col-xs-offset-1"> Editar Perfil</button></a>
			</c:if>

	<table id="tab" class="table table-striped">
	<thead>
		<tr>
			<th>#</th>
			<th>Data</th>
			<th>Prato</th>
			<th>Valor Calórico</th>
			<th>Ingredientes</th>
			
		</tr>
	</thead>
		<tbody>
	<c:forEach items="${cardapioList}" var="cardapio">
		<tr> 
		<td>${cardapio.id}</td>
		<td>${cardapio.data}</td>
		<td>${cardapio.prato.nomePrato}</td> 
		<td>${cardapio.prato.vcalorico}</td>
		<td>${cardapio.prato.ingredientes}</td>
 	</tr>
	</c:forEach>
	</tbody>
		
		</table>
		</div>	
</div>
</body>
</html>